<nz-drawer [nzClosable]="false" [nzVisible]="visible" nzPlacement="right" nzWidth="40%" nzTitle="模板检验项目"
           [nzFooter]="footerTpl"
           (nzOnClose)="close()">

  <nz-spin [nzSpinning]="nzLoading">
    <div>
      <div>
        <button nzSize="small" nz-button nzType="primary" (click)="addOneRows()" [disabled]="isView">
          <span>添加行</span>
        </button>
        <button nzSize="small" nz-button class="ml-sm" (click)="delTable()" [disabled]="isView">
          <span>删除行</span>
        </button>
        <nz-divider [nzDashed]=true style="margin: 8px"></nz-divider>
      </div>
      <div class="table-container">
        <nz-table #basicTable [nzData]="listOfData" [nzBordered]="true"
                  nzSize="small"
                  [nzShowPagination]="false"
                  [nzFrontPagination]="false"
        >
          <thead>
          <tr>
            <th nzShowCheckbox [width]="30"
                (nzCheckedChange)="checkAllInspectionList($event)"></th>
            <th [nzAlign]="'center'">检验项名称</th>
            <th [nzAlign]="'center'">检验标准</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of basicTable.data;let index_=index">
            <td nzShowCheckbox [width]="30" [(nzChecked)]="data['checked']"></td>
            <td>
              <input nzSize="small" nz-input [(ngModel)]="data['checkItemName']">
            </td>
            <td>
              <input nzSize="small" nz-input [(ngModel)]="data['checkStandard']">
            </td>
          </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </nz-spin>

  <ng-template #footerTpl>
    <div style="float: right">
      <button nz-button style="margin-right: 8px;" (click)="close()">取消</button>
      <button nz-button nzType="primary" (click)="save()">保存</button>
    </div>
  </ng-template>

</nz-drawer>
